<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
	<div class="wrapper wrapper-content ">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-content">
						<form class="form-horizontal m-t" id="signupForm">
							<div class="form-group">	
								<label class="col-sm-3 control-label">类型名称：</label>
								<div class="col-sm-8">
									<input id="name" name="name" class="form-control" type="text">
								</div>
							</div>

							<div class="form-group">
								<label class="col-sm-3 control-label">标题描述：</label>
								<div class="col-sm-8">
									<input id="title" name="title" class="form-control" type="text">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">上级分类：</label>
								<div class="col-sm-8">
									<input id="parentId" name="parentId" class="hidden"> <input
										id="parentIds" name="parentIds" class="form-control" type="text"
										style="cursor: pointer;" onclick="openClass()"
										readonly="readonly" placeholder="上级分类">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">活动图片：</label>
								<div class="col-sm-8">
									<input id="advimg" name="advimg" class="form-control" type="hidden" />
									<img width="155px" height="120px" id="img4"  />

									<button type="button" class="layui-btn" id="file">
										<i class="fa fa-cloud"></i>上传图片
									</button>
								</div>
							</div>
														<div class="form-group">	
								<label class="col-sm-3 control-label">活动链接：</label>
								<div class="col-sm-8">
									<input id="advurl" name="advurl" class="form-control" type="text">
								</div>
							</div>
																					<div class="form-group">
								<div class="col-sm-8 col-sm-offset-3">
									<button type="submit" class="btn btn-primary">提交</button>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
	</div>
	</div>
	<div th:include="include::footer"></div>
	<script type="text/javascript" src="/js/appjs/shop/tFloor/add.js">
	</script>
	<script>
        layui.use('upload', function() {
            var upload = layui.upload;
            //执行实例
            var uploadInst = upload.render({
                elem: '#file', //绑定元素
                url: '/common/sysFile/upload', //上传接口
                size: 1000,
                accept: 'file',
                done: function (r) {
                    var fileName = r.url;
                    $("#advimg").val(fileName);
                    $("#img4").attr("src", fileName);
                },
                error: function (r) {
                    layer.msg(r.msg);
                }
            });
        });
	</script>
</body>
</html>
